from keras.preprocessing.image import ImageDataGenerator

class preprocessing:
    def generatorGet(self):
        gen = ImageDataGenerator(
            featurewise_center=True,
            samplewise_center=False,
            featurewise_std_normalization=False,
            samplewise_std_normalization=False,
            zca_whitening=False,     # zca白化
            rotation_range=15,      # 数据增强，进行随机角度旋转
            width_shift_range=[-50.,50.],   # 数据增强
            height_shift_range=[-50.,50.],  #
            shear_range=0.,         # 暂时不理解
            zoom_range=0.,          #
            channel_shift_range=0., #
            fill_mode='nearest',    # 
            cval=0.0,               #
            horizontal_flip=True,   # 数据增强，进行随机水平方向翻转
            vertical_flip=True,     # 数据增强，进行随机竖直方向翻转
            rescale=None,           #
            preprocessing_function=None,
            data_format="channels_last")
        
        raw = ImageDataGenerator(
            featurewise_center=False,
            samplewise_center=False,
            featurewise_std_normalization=False,
            samplewise_std_normalization=False,
            zca_whitening=False,
            rotation_range=0,
            width_shift_range=0.,
            height_shift_range=0.,
            shear_range=0.,
            zoom_range=0.,
            channel_shift_range=0.,
            fill_mode='nearest',
            cval=0.0,
            horizontal_flip=False,
            vertical_flip=False,
            rescale=None,
            preprocessing_function=None,
            data_format="channels_last")
        return gen


    def patch(self):
        '''
        So far I haven't got a way to segement the image block into patches.
        '''
        print('Null')

if __name__ == "__main__":
    print(preprocessing().generatorGet())